import Layout from './pages/layout'
import Home from './pages/home'
import Qa from './pages/qa'
import My from './pages/my'
import Video from './pages/video'
import Search from './pages/search'
import Login from './pages/login'
import Detail from './pages/detail'
import Fans from './pages/fans'
import { BrowserRouter as Router, Route, Redirect, Routes, Navigate, Link } from 'react-router-dom'
function App() {
    return (
        <div className="App">
            <Router>
                <Routes>
                    <Route path="/" element={<Layout />} >
                        <Route path="home" element={<Home />} />
                        <Route path="qa" element={<Qa />} />
                        <Route path="my" element={<My />} />
                        <Route path="video" element={<Video />} />
                    </Route>
                    <Route path="/login" element={<Login />} />
                    <Route path="/search" element={<Search />} />
                    <Route path="/article/:id" element={<Detail />} />
                    <Route path="/user/fans/:class/:id" element={<Fans />} />
                </Routes>
            </Router>
        </div>
    );
}

export default App;
